home *** CD-ROM | disk | FTP | other *** search
/ Joystick Magazine 2000 September / cd joystick no118 septembre 2000 cd 2.iso / Data / sharewares / Jeux / JACK.ZIP / Lisezmoi.txt < prev   
Text File  |  1999-10-19  |  37KB  |  1,397 lines

  1. Salut α tous,
  2.  
  3. Voila mon deuxieme jeux, donc maintenant si celui ci vous le trouvez α chier vous pouvez m'ecrire pour m'insulter car cette fois je n'ai plus d'excuse.
  4. Je vous donne egalement le listing car beaucoup de gens m'ont demandΘ quel langage j'utilise.
  5.  
  6. Si vous voulez plus d'infos allez sur le site : www.divgames.com
  7.  
  8. Merci aussi α l'auteur de la musique EMELIE qui se trouvait dans le CD de Joy.
  9.  
  10. StΘphane "BIM" CITTADINO
  11. bim@accesosis.es
  12.  
  13. PS : DΘsolΘ jΘjΘ de ne pas t'avoir rΘpondu mais ton mail ne marche pas !!!
  14.  
  15. LISTING :
  16.  
  17. //******************************************
  18. //**                                      **
  19. //**            BOMB JACK 2000            **
  20. //**                                      **
  21. //**                PAR BIM               **
  22. //**                                      **
  23. //**                                      **
  24. //**         COMMENCE LE 01 AOUT 1999     **
  25. //**                                      **
  26. //**                                      **
  27. //******************************************
  28. //******************************************
  29. // REPERES:
  30. //
  31. // CADRE ROUGE
  32. // Haut Gauche : 492 X 9
  33. // Bas Droit :   635 X 472
  34. // Couleur : 52
  35. //
  36. // PLATEFORMES :
  37. // Gauche : 115
  38. // Droite : 349
  39. // Milieu : 239
  40. //
  41. //*******************************************
  42. PROGRAM BOMBJACK;
  43.  
  44. GLOBAL
  45. robots=0;
  46.  
  47. col_bombe;
  48. col_bonus;
  49. col_vie;
  50. col_robot;
  51. col_ballon;
  52.  
  53. compteur_bombe;
  54. bombe_allume=0;
  55. max_num=0;
  56.  
  57. compte_bonus=0;
  58. compte_ballon=0;
  59.  
  60. r_b_a=0;
  61. bonus_fois=1;
  62.  
  63. force_saut=40;
  64.  
  65. s_vie;
  66. s_saute;
  67. s_bombe;
  68. s_bonus;
  69. s_trans;
  70. s_mort;
  71. s_ballon;
  72. s_alarme;
  73. s_explo;
  74. c_ballon;
  75. c_alarme;
  76.  
  77. level=1;
  78. point=0;
  79. vie=3;
  80. record;
  81.  
  82. id_jack;
  83. id_robot;
  84.  
  85. fonte1;
  86. fonte2;
  87. fonte3;
  88. fonte4;
  89.  
  90. mort=false;
  91. destruction=FALSE;
  92. reprise=false;
  93.  
  94. fond;
  95. option;
  96.  
  97. LOCAL
  98. vitesse_gravite=0;
  99. au_sol=FALSE;
  100. vitesse=0;
  101.  
  102. num;
  103. forme;
  104.  
  105. BEGIN
  106.  
  107.     fopen("jack.dat","a");
  108.     load("jack.dat",&record);
  109.  
  110.     set_mode(m640x480);
  111.  
  112.     load_fpg("progs\jack\jack.fpg");
  113.  
  114.     s_saute=load_wav("progs\jack\saute.wav",0);
  115.     s_bombe=load_wav("progs\jack\bombe.wav",0);
  116.     s_bonus=load_wav("progs\jack\bonus.wav",0);
  117.     s_trans=load_wav("progs\jack\trans.wav",0);
  118.     s_mort=load_wav("progs\jack\mort.wav",0);
  119.     s_ballon=load_wav("progs\jack\ballon.wav",1);
  120.     s_alarme=load_wav("progs\jack\alarme.wav",1);
  121.     s_explo=load_wav("progs\jack\explo.wav",0);
  122.     s_vie=load_wav("progs\jack\vie.wav",0);
  123.  
  124.     fonte1=load_fnt("progs\jack\jack.fnt");
  125.     fonte2=load_fnt("progs\jack\fonte2.fnt");
  126.     fonte3=load_fnt("progs\jack\point.fnt");
  127.     fonte4=load_fnt("progs\jack\bonus.fnt");
  128.  
  129.     menu();
  130. END
  131. PROCESS menu();
  132. PRIVATE
  133. fond_menu;
  134. graphic;
  135. BEGIN
  136.  
  137.     fond_menu=load_map("progs\jack\menu.map"):
  138.     put_screen(0,fond_menu);
  139.     unload_map(fond_menu);
  140.     fade_on();
  141.  
  142.     //write(fonte1,320,-6,1,"BOMB JACK 2000");
  143.     //write(fonte2,320,64,1,"Le remake qui tue la mort !!!");
  144.     write(fonte3,310,405,1,"Commencer        Instructions        Quitter");
  145.  
  146.     xput(0,62,320,420,0,100,4,0);
  147.  
  148.     mouse.size=150;
  149.     mouse.graph=9;
  150.  
  151.     option=-1;
  152.     WHILE (option<0)
  153.         mouse.graph++;
  154.         if(mouse.graph>10)
  155.             mouse.graph=9;
  156.         end
  157.         IF (key(_esc)) option=1; END
  158.  
  159.         IF (key(_space) OR key(_enter)) option=0; END
  160.  
  161.         IF (mouse.left AND mouse.y>370)
  162.  
  163.             IF (mouse.x<214)
  164.                 sound(s_explo,256,256);
  165.                 from graphic=56 to 61;
  166.                     mouse.graph=graphic;
  167.                     FRAME;
  168.                 end
  169.  
  170.             option=0;
  171.             ELSE
  172.  
  173.                 IF (mouse.x>426)
  174.                     sound(s_explo,256,256);
  175.                     from graphic=56 to 61;
  176.                         mouse.graph=graphic;
  177.                         FRAME;
  178.                     end
  179.  
  180.                     option=1;
  181.                     exit("Tchao !!!",0);
  182.                 ELSE
  183.                     sound(s_explo,256,256);
  184.                     from graphic=56 to 61;
  185.                         mouse.graph=graphic;
  186.                         FRAME;
  187.                     end
  188.  
  189.                     option=2;
  190.                     fade(200,0,0,6);
  191.                     WHILE(fading)
  192.                         frame;
  193.                     end
  194.  
  195.                 END
  196.             END
  197.         END
  198.         FRAME;
  199.     END
  200.  
  201.     clear_screen();
  202.     delete_text(all_text);
  203.     mouse.graph=0;
  204.  
  205.     SWITCH(option)
  206.         CASE 0:
  207.             control();
  208.         END
  209.         CASE 2:
  210.             instruction();
  211.         END
  212.     END
  213. END
  214.  
  215. PROCESS control()
  216. PRIVATE
  217. texte[9];
  218. BEGIN
  219.  
  220.     if(level>7 or vie<0)
  221.         if(vie<0)
  222.             mort=TRUE;
  223.             vie=0;
  224.         end
  225.         if(vie>=0 and level>7)
  226.         level--;
  227.         end
  228.         if(point>record)
  229.             record=point;
  230.         end
  231.         save("jack.dat",&record,sizeof(record));
  232.         let_me_alone();
  233.         TIMER[1]=0;
  234.            fade_on();
  235.            delete_text(all_text);
  236.            fond=load_map("progs\jack\fin_nive.map");
  237.            put_screen(0,fond);
  238.            write(fonte1,175,310,6,"GAME OVER");
  239.        repeat
  240.             frame;
  241.        until(TIMER[1]>300)
  242.         fade(0,0,0,2);
  243.         while(fading);
  244.             frame;
  245.         end
  246.         unload_map(fond);
  247.         delete_text(all_text);
  248.         let_me_alone();
  249.         credit();
  250.     end
  251.     if(mort==FALSE)
  252.     TIMER[0]=0;
  253.     let_me_alone();
  254.     delete_text(all_text);
  255.     clear_screen();
  256.     fade_on();
  257.     repeat
  258.         write(fonte1,180,250,6,"LEVEL :");
  259.         write_INT(fonte1,390,253,6,&level);
  260.         frame;
  261.     until(TIMER[0]>300)
  262.     fade(0,0,0,2);
  263.     while(fading);
  264.       frame;
  265.     end
  266.     end
  267.     delete_text(all_text);
  268.     signal(type robot, s_kill);
  269.     signal(type bonus,s_kill);
  270.     signal(type bonus_vie,s_kill);
  271.     signal(type ballon,s_kill);
  272.     stop_sound(c_ballon);
  273.     signal(type texte_bonus,s_kill);
  274.     fade_on();
  275.         SWITCH(level)
  276.         CASE 1:
  277.             fond=load_map("progs\jack\fond1.map");
  278.             put_screen(0,fond);
  279.             unload_map(fond);
  280.             texte[0]=write(fonte2,500,325,6,"Record : ");
  281.             texte[2]=write_int(fonte3,500,370,6,&record);
  282.             texte[3]=write(fonte2,500,418,6,"Bomb Jack");
  283.             texte[4]=write(fonte2,540,438,6,"2000");
  284.             texte[5]=write(fonte2,500,155,6,"Score : ");
  285.             texte[6]=write_int(fonte3,500,200,6,&point);
  286.             texte[7]=write(fonte2,500,265,6,"Vie : ");
  287.             texte[8]=write_int(fonte3,568,271,6,&vie);
  288.             texte[9]=write(0,498,465,6,"Copyright BIMWARE 1999");
  289.             put(0,23,564,57);
  290.             TIMER[0]=0;
  291.             texte[1]=write(fonte1,100,280,6,"GET READY !!!");
  292.             repeat
  293.                 frame;
  294.             until(TIMER[0]>300)
  295.             delete_text(texte[1]);
  296.             if(mort==fALSE)
  297.  
  298.             FOR(y=70; y<460; y+=50)
  299.                 compteur_bombe++;
  300.                 bombe(30,y,compteur_bombe);
  301.             END
  302.  
  303.             FOR(x=80; x<450; x+=50)
  304.                 compteur_bombe++;
  305.                 bombe(x,20,compteur_bombe);
  306.             END
  307.  
  308.             FOR(y=250; y<450; y+=50)
  309.                 compteur_bombe++;
  310.                 bombe(430,y,compteur_bombe);
  311.             END
  312.  
  313.             FOR(y=250; y<450; y+=50)
  314.                 compteur_bombe++;
  315.                 bombe(350,y,compteur_bombe);
  316.             END
  317.             end
  318.             robot(110,50,80,150,1);
  319.             id_jack=jack(240,200);
  320.             mort=FALSE;
  321.  
  322.             frame;
  323.         END
  324.         CASE 2:
  325.             fond=load_map("progs\jack\fond2.map");
  326.             put_screen(0,fond);
  327.             unload_map(fond);
  328.  
  329.             texte[0]=write(fonte2,500,325,6,"Record : ");
  330.             texte[2]=write_int(fonte3,500,370,6,&record);
  331.             texte[3]=write(fonte2,500,418,6,"Bomb Jack");
  332.             texte[4]=write(fonte2,540,438,6,"2000");
  333.             texte[5]=write(fonte2,500,155,6,"Score : ");
  334.             texte[6]=write_int(fonte3,500,200,6,&point);
  335.             texte[7]=write(fonte2,500,265,6,"Vie : ");
  336.             texte[8]=write_int(fonte3,568,271,6,&vie);
  337.             texte[9]=write(0,498,465,6,"Copyright BIMWARE 1999");
  338.             put(0,23,564,57);
  339.             TIMER[0]=0;
  340.             texte[1]=write(fonte1,100,280,6,"GET READY !!!");
  341.             repeat
  342.                 frame;
  343.             until(TIMER[0]>300)
  344.             delete_text(texte[1]);
  345.             if(mort==fALSE)
  346.  
  347.             FOR(x=300; x<450; x+=50)
  348.                 compteur_bombe++;
  349.                 bombe(x,410,compteur_bombe);
  350.             END
  351.  
  352.             FOR(x=70; x<220; x+=50)
  353.                 compteur_bombe++;
  354.                 bombe(x,410,compteur_bombe);
  355.             END
  356.  
  357.             FOR(y=330; y>200; y-=50)
  358.                 compteur_bombe++;
  359.                 bombe(30,y,compteur_bombe);
  360.             END
  361.  
  362.             FOR(y=330; y>200; y-=50)
  363.                 compteur_bombe++;
  364.                 bombe(450,y,compteur_bombe);
  365.             END
  366.  
  367.             FOR(x=450; x>300; x-=50)
  368.                 compteur_bombe++;
  369.                 bombe(x,30,compteur_bombe);
  370.             END
  371.  
  372.             FOR(x=70; x<220; x+=50)
  373.                 compteur_bombe++;
  374.                 bombe(x,30,compteur_bombe);
  375.             END
  376.  
  377.             FOR(y=230; y>100; y-=50)
  378.                 compteur_bombe++;
  379.                 bombe(280,y,compteur_bombe);
  380.             END
  381.  
  382.             FOR(y=130; y<280; y+=50)
  383.                 compteur_bombe++;
  384.                 bombe(200,y,compteur_bombe);
  385.             END
  386.             end
  387.             robot(110,50,80,150,1);
  388.             id_jack=jack(240,200);
  389.             mort=FALSE;
  390.  
  391.             frame;
  392.  
  393.         end
  394.         CASE 3:
  395.             fond=load_map("progs\jack\fond3.map");
  396.             put_screen(0,fond);
  397.             unload_map(fond);
  398.  
  399.             texte[0]=write(fonte2,500,325,6,"Record : ");
  400.             texte[2]=write_int(fonte3,500,370,6,&record);
  401.             texte[3]=write(fonte2,500,418,6,"Bomb Jack");
  402.             texte[4]=write(fonte2,540,438,6,"2000");
  403.             texte[5]=write(fonte2,500,155,6,"Score : ");
  404.             texte[6]=write_int(fonte3,500,200,6,&point);
  405.             texte[7]=write(fonte2,500,265,6,"Vie : ");
  406.             texte[8]=write_int(fonte3,568,271,6,&vie);
  407.             texte[9]=write(0,498,465,6,"Copyright BIMWARE 1999");
  408.             put(0,23,564,57);
  409.             TIMER[0]=0;
  410.             texte[1]=write(fonte1,100,280,6,"GET READY !!!");
  411.             repeat
  412.                 frame;
  413.             until(TIMER[0]>300)
  414.             delete_text(texte[1]);
  415.             if(mort==fALSE)
  416.  
  417.             FOR(x=200; x<350; x+=50)
  418.                 compteur_bombe++;
  419.                 bombe(x,350,compteur_bombe);
  420.             END
  421.             FOR(x=200; x<350; x+=50)
  422.                 compteur_bombe++;
  423.                 bombe(x,420,compteur_bombe);
  424.             END
  425.  
  426.             FOR(x=70; x<220; x+=50)
  427.                 compteur_bombe++;
  428.                 bombe(x,200,compteur_bombe);
  429.             END
  430.  
  431.             FOR(x=410; x>260; x-=50)
  432.                 compteur_bombe++;
  433.                 bombe(x,200,compteur_bombe);
  434.             END
  435.  
  436.             FOR(x=410; x>260; x-=50)
  437.                 compteur_bombe++;
  438.                 bombe(x,30,compteur_bombe);
  439.             END
  440.  
  441.             FOR(x=70; x<220; x+=50)
  442.                 compteur_bombe++;
  443.                 bombe(x,30,compteur_bombe);
  444.             END
  445.  
  446.             FOR(y=285; y>155; y-=50)
  447.                 compteur_bombe++;
  448.                 bombe(265,y,compteur_bombe);
  449.             END
  450.  
  451.             FOR(y=185; y<335; y+=50)
  452.                 compteur_bombe++;
  453.                 bombe(210,y,compteur_bombe);
  454.             END
  455.             end
  456.             robot(110,50,80,150,1);
  457.             id_jack=jack(240,200);
  458.             mort=FALSE;
  459.  
  460.             frame;
  461.  
  462.         end
  463.         CASE 4:
  464.             fond=load_map("progs\jack\fond4.map");
  465.             put_screen(0,fond);
  466.             unload_map(fond);
  467.  
  468.             texte[0]=write(fonte2,500,325,6,"Record : ");
  469.             texte[2]=write_int(fonte3,500,370,6,&record);
  470.             texte[3]=write(fonte2,500,418,6,"Bomb Jack");
  471.             texte[4]=write(fonte2,540,438,6,"2000");
  472.             texte[5]=write(fonte2,500,155,6,"Score : ");
  473.             texte[6]=write_int(fonte3,500,200,6,&point);
  474.             texte[7]=write(fonte2,500,265,6,"Vie : ");
  475.             texte[8]=write_int(fonte3,568,271,6,&vie);
  476.             texte[9]=write(0,498,465,6,"Copyright BIMWARE 1999");
  477.             put(0,23,564,57);
  478.             TIMER[0]=0;
  479.             texte[1]=write(fonte1,100,280,6,"GET READY !!!");
  480.             repeat
  481.                 frame;
  482.             until(TIMER[0]>300)
  483.             delete_text(texte[1]);
  484.             if(mort==fALSE)
  485.  
  486.             FOR(x=200; x>50; x-=50)
  487.                 compteur_bombe++;
  488.                 bombe(x,320,compteur_bombe);
  489.             END
  490.  
  491.             FOR(x=370; x>240; x-=50)
  492.                 compteur_bombe++;
  493.                 bombe(x,320,compteur_bombe);
  494.             END
  495.  
  496.             FOR(x=180; x>30; x-=50)
  497.                 compteur_bombe++;
  498.                 bombe(x,230,compteur_bombe);
  499.             END
  500.  
  501.             FOR(x=380; x>250; x-=50)
  502.                 compteur_bombe++;
  503.                 bombe(x,230,compteur_bombe);
  504.             END
  505.  
  506.             FOR(x=150; x>0; x-=50)
  507.                 compteur_bombe++;
  508.                 bombe(x,140,compteur_bombe);
  509.             END
  510.  
  511.             FOR(x=380; x>250; x-=50)
  512.                 compteur_bombe++;
  513.                 bombe(x,140,compteur_bombe);
  514.             END
  515.  
  516.             FOR(x=410; x>280; x-=50)
  517.                 compteur_bombe++;
  518.                 bombe(x,30,compteur_bombe);
  519.             END
  520.  
  521.             FOR(x=60; x<210; x+=50)
  522.                 compteur_bombe++;
  523.                 bombe(x,30,compteur_bombe);
  524.             END
  525.             end
  526.             robot(110,50,80,150,1);
  527.             id_jack=jack(240,200);
  528.             mort=FALSE;
  529.  
  530.             frame;
  531.  
  532.  
  533.         END
  534.         CASE 5:
  535.             fond=load_map("progs\jack\fond5.map");
  536.             put_screen(0,fond);
  537.             unload_map(fond);
  538.  
  539.             texte[0]=write(fonte2,500,325,6,"Record : ");
  540.             texte[2]=write_int(fonte3,500,370,6,&record);
  541.             texte[3]=write(fonte2,500,418,6,"Bomb Jack");
  542.             texte[4]=write(fonte2,540,438,6,"2000");
  543.             texte[5]=write(fonte2,500,155,6,"Score : ");
  544.             texte[6]=write_int(fonte3,500,200,6,&point);
  545.             texte[7]=write(fonte2,500,265,6,"Vie : ");
  546.             texte[8]=write_int(fonte3,568,271,6,&vie);
  547.             texte[9]=write(0,498,465,6,"Copyright BIMWARE 1999");
  548.             put(0,23,564,57);
  549.             TIMER[0]=0;
  550.             texte[1]=write(fonte1,100,280,6,"GET READY !!!");
  551.             repeat
  552.                 frame;
  553.             until(TIMER[0]>300)
  554.             delete_text(texte[1]);
  555.             if(mort==fALSE)
  556.             FOR(y=290; y>10; y-=50)
  557.                 compteur_bombe++;
  558.                 bombe(400,y,compteur_bombe);
  559.             END
  560.  
  561.             FOR(y=40; y<320; y+=50)
  562.                 compteur_bombe++;
  563.                 bombe(300,y,compteur_bombe);
  564.             END
  565.  
  566.             FOR(y=290; y>10; y-=50)
  567.                 compteur_bombe++;
  568.                 bombe(150,y,compteur_bombe);
  569.             END
  570.  
  571.             FOR(y=40; y<320; y+=50)
  572.                 compteur_bombe++;
  573.                 bombe(50,y,compteur_bombe);
  574.             END
  575.  
  576.             end
  577.             robot(110,50,80,150,1);
  578.             id_jack=jack(240,200);
  579.             mort=FALSE;
  580.  
  581.             frame;
  582.  
  583.         end
  584.         CASE 6:
  585.  
  586.             fond=load_map("progs\jack\fond6.map");
  587.             put_screen(0,fond);
  588.             unload_map(fond);
  589.  
  590.             texte[0]=write(fonte2,500,325,6,"Record : ");
  591.             texte[2]=write_int(fonte3,500,370,6,&record);
  592.             texte[3]=write(fonte2,500,418,6,"Bomb Jack");
  593.             texte[4]=write(fonte2,540,438,6,"2000");
  594.             texte[5]=write(fonte2,500,155,6,"Score : ");
  595.             texte[6]=write_int(fonte3,500,200,6,&point);
  596.             texte[7]=write(fonte2,500,265,6,"Vie : ");
  597.             texte[8]=write_int(fonte3,568,271,6,&vie);
  598.             texte[9]=write(0,498,465,6,"Copyright BIMWARE 1999");
  599.             put(0,23,564,57);
  600.             TIMER[0]=0;
  601.             texte[1]=write(fonte1,100,280,6,"GET READY !!!");
  602.             repeat
  603.                 frame;
  604.             until(TIMER[0]>300)
  605.             delete_text(texte[1]);
  606.             if(mort==fALSE)
  607.  
  608.             FOR(y=250; y<400; y+=50)
  609.                 compteur_bombe++;
  610.                 bombe(80,y,compteur_bombe);
  611.             END
  612.             FOR(y=250; y<400; y+=50)
  613.                 compteur_bombe++;
  614.                 bombe(160,y,compteur_bombe);
  615.             END
  616.             FOR(x=70; x<220; x+=50)
  617.                 compteur_bombe++;
  618.                 bombe(x,30,compteur_bombe);
  619.             END
  620.             FOR(x=370; x<520; x+=50)
  621.                 compteur_bombe++;
  622.                 bombe(x,30,compteur_bombe);
  623.             END
  624.             FOR(x=370; x<520; x+=50)
  625.                 compteur_bombe++;
  626.                 bombe(x,180,compteur_bombe);
  627.             END
  628.             FOR(x=190; x<340; x+=50)
  629.                 compteur_bombe++;
  630.                 bombe(x,390,compteur_bombe);
  631.             END
  632.  
  633.             FOR(x=400; x>250; x-=50)
  634.                 compteur_bombe++;
  635.                 bombe(x,320,compteur_bombe);
  636.             END
  637.             FOR(y=220; y<370; y+=50)
  638.                 compteur_bombe++;
  639.                 bombe(210,y,compteur_bombe);
  640.             END
  641.  
  642.             end
  643.             robot(110,50,80,150,1);
  644.             id_jack=jack(240,200);
  645.             mort=FALSE;
  646.  
  647.             frame;
  648.  
  649.         END
  650.         CASE 7:
  651.  
  652.             fond=load_map("progs\jack\fond7.map");
  653.             put_screen(0,fond);
  654.             unload_map(fond);
  655.  
  656.             texte[0]=write(fonte2,500,325,6,"Record : ");
  657.             texte[2]=write_int(fonte3,500,370,6,&record);
  658.             texte[3]=write(fonte2,500,418,6,"Bomb Jack");
  659.             texte[4]=write(fonte2,540,438,6,"2000");
  660.             texte[5]=write(fonte2,500,155,6,"Score : ");
  661.             texte[6]=write_int(fonte3,500,200,6,&point);
  662.             texte[7]=write(fonte2,500,265,6,"Vie : ");
  663.             texte[8]=write_int(fonte3,568,271,6,&vie);
  664.             texte[9]=write(0,498,465,6,"Copyright BIMWARE 1999");
  665.             put(0,23,564,57);
  666.             TIMER[0]=0;
  667.             texte[1]=write(fonte1,100,280,6,"GET READY !!!");
  668.             repeat
  669.                 frame;
  670.             until(TIMER[0]>300)
  671.             delete_text(texte[1]);
  672.             if(mort==fALSE)
  673.  
  674.             FOR(y=110; y<260; y+=50)
  675.                 compteur_bombe++;
  676.                 bombe(85,y,compteur_bombe);
  677.             END
  678.             FOR(y=110; y<260; y+=50)
  679.                 compteur_bombe++;
  680.                 bombe(150,y,compteur_bombe);
  681.             END
  682.             FOR(y=110; y<260; y+=50)
  683.                 compteur_bombe++;
  684.                 bombe(320,y,compteur_bombe);
  685.             END
  686.             FOR(y=110; y<260; y+=50)
  687.                 compteur_bombe++;
  688.                 bombe(385,y,compteur_bombe);
  689.             END
  690.             FOR(y=370; y>220; y-=50)
  691.                 compteur_bombe++;
  692.                 bombe(390,y,compteur_bombe);
  693.             END
  694.             FOR(y=370; y>220; y-=50)
  695.                 compteur_bombe++;
  696.                 bombe(325,y,compteur_bombe);
  697.             END
  698.             FOR(y=370; y>220; y-=50)
  699.                 compteur_bombe++;
  700.                 bombe(160,y,compteur_bombe);
  701.             END
  702.             FOR(y=370; y>220; y-=50)
  703.                 compteur_bombe++;
  704.                 bombe(90,y,compteur_bombe);
  705.             END
  706.  
  707.             end
  708.             robot(110,50,80,150,1);
  709.             id_jack=jack(240,200);
  710.             mort=FALSE;
  711.  
  712.             frame;
  713.  
  714.         END
  715.  
  716.         CASE 8:
  717.             level++;
  718.             control();
  719.         end
  720.  
  721.         END
  722.         LOOP
  723.             if(key(_b))
  724.                 let_me_alone();
  725.                 robots=1;
  726.                 compteur_bombe=0;
  727.                 level+=6;
  728.                 control();
  729.             end
  730.             if(robots==0 and not destruction AND mort==FALSE)
  731.                 id_robot=robot(110,50,80,150,1);
  732.             end
  733.             if(rand(1,1200)<4 and compte_bonus==0)
  734.                 x=rand(10,460);
  735.                 compte_bonus++;
  736.                 bonus(x,5);
  737.             end
  738.  
  739.             if(rand(1,3000)<3 and compte_bonus==0 and mort==false and vie<3)
  740.                 x=rand(10,460);
  741.                 compte_bonus++;
  742.                 bonus_vie(x,5);
  743.             end
  744.             if(rand(1,200)<2 and robots>2 and compte_ballon==0 and mort==false)
  745.                 compte_ballon++;
  746.                 x=rand(10,460);
  747.                 c_ballon=sound(s_ballon,256,256);
  748.                 ballon(450,5);
  749.             end
  750.  
  751.  
  752.             Frame;
  753.         END
  754. END
  755.  
  756. PROCESS jack(x,y)
  757. private
  758.  
  759.     incx=0;
  760.     dernier_y=0;
  761.     derniere_vit=0;
  762.  
  763. BEGIN
  764. GRAPH=2; size=120; priority=1;
  765.  
  766.     loop
  767.         if(TIMER[2]>700 AND destruction==TRUE)
  768.             stop_sound(c_alarme);
  769.             destruction=false;
  770.             reprise=true;
  771.             compte_ballon=0;
  772.         end
  773.         if(destruction)
  774.             col_robot=collision(type robot);
  775.             if(col_robot)
  776.                 signal (col_robot,s_kill);
  777.                 point+=50;
  778.                 robots--;
  779.             end
  780.         end
  781.  
  782.         col_bombe=collision(type bombe);
  783.         col_bonus=collision(type bonus);
  784.         col_vie=collision(type bonus_vie);
  785.         col_ballon=collision(type ballon);
  786.  
  787.         IF(col_ballon and mort==FALSE)
  788.             stop_sound(c_ballon);
  789.             signal (col_ballon, s_kill);
  790.             reprise=false;
  791.             destruction=true;
  792.             TIMER[2]=0;
  793.         end
  794.  
  795.         if(col_vie and mort==FALSE)
  796.             compte_bonus=0;
  797.             point+=10;
  798.             vie++;
  799.             signal(col_vie,s_kill);
  800.             sound(s_vie,256,256);
  801.  
  802.         end
  803.         if(col_bombe and mort==FALSE)
  804.             if(col_bombe.graph==8)
  805.                 point+=5;
  806.             end
  807.             if(col_bombe.graph==9 or col_bombe.graph==10)
  808.                 if(bonus_fois>1)
  809.                     texte_bonus(col_bombe.x,col_bombe.y);
  810.                 end
  811.                 point+=15*bonus_fois;
  812.                 r_b_a++;
  813.  
  814.             end
  815.             sound(s_bombe,256,256);
  816.             signal(col_bombe,s_kill);
  817.             compteur_bombe--;
  818.             if(compteur_bombe==0)
  819.                 level++;
  820.                 signal(type bombe, s_kill);
  821.                 signal(type robot, s_kill);
  822.                 signal(type bonus,s_kill);
  823.                 signal(type bonus_vie,s_kill);
  824.                 signal(type ballon,s_kill);
  825.                 signal(type texte_bonus,s_kill);
  826.  
  827.                 fade(0,0,0,2);
  828.                 while(fading);
  829.                     frame;
  830.                 end
  831.                 fin_niveau();
  832.             end
  833.         end
  834.         if(col_bonus and mort==FALSE)
  835.             point+=5;
  836.             compte_bonus=0;
  837.             bonus_fois++;
  838.             sound(s_bonus,256,256);
  839.             signal(col_bonus,s_kill);
  840.         end
  841.  
  842.         IF ((key(_right) OR joy.right) AND vitesse<6)
  843.             graph++;
  844.             if(graph>7)
  845.                 graph=2;
  846.             end
  847.             vitesse+=1;
  848.             flags=1;
  849.         ELSE
  850.             IF ((key(_left) OR joy.left) AND vitesse>-6)
  851.                 graph++;
  852.                 if(graph>7)
  853.                     graph=2;
  854.                 end
  855.  
  856.                 vitesse-=2;
  857.                 flags=0;
  858.             ELSE
  859.                 IF (vitesse>0)
  860.                     vitesse--;
  861.                 END
  862.                 IF (vitesse<0)
  863.                     vitesse++;
  864.                 END
  865.             END
  866.         END
  867.  
  868.         derniere_vit=vitesse;
  869.         IF (derniere_vit<>0)
  870.             incx=derniere_vit/abs(derniere_vit);
  871.             WHILE (derniere_vit<>0)
  872.  
  873.                 IF (map_get_pixel(0,899+LEVEL,(x+incx),(y-2))<>15)
  874.  
  875.                     IF (map_get_pixel(0,899+LEVEL,(x+incx),(y-32))<>15)
  876.                         x+=incx;
  877.                     END
  878.                 END
  879.                 derniere_vit-=incx;
  880.             END
  881.         END
  882.  
  883.         IF  (key(_control) or joy.button1 and au_sol)
  884.             sound(s_saute,56,200);
  885.             vitesse_gravite=-force_saut;
  886.         END
  887.         gravite(18,18);
  888.         frame;
  889.      end
  890. END
  891.  
  892.  
  893. PROCESS bombe(x,y,num);
  894. BEGIN
  895.     graph=9;size=120;
  896.         LOOP
  897.         bombe_allume=max(id.num,compteur_bombe);
  898.         if(id.num==bombe_allume)
  899.             graph++;
  900.             if(graph>10)
  901.                 graph=9;
  902.             end
  903.         else
  904.         GRAPH=8;
  905.         end
  906.  
  907.         frame;
  908.     end
  909. END
  910.  
  911. PROCESS robot(x,y,x1,x2,forme);
  912. PRIVATE
  913. col_jack=0;
  914. direction=-1;
  915. debut;
  916. fin;
  917. ancien_forme;
  918. incr_y;
  919. BEGIN
  920.   robots++;
  921.   TIMER[1]=0;
  922.   TIMER[3]=0;
  923.   LOOP
  924.     if(reprise and id.forme==3)
  925.         stop_sound(c_alarme);
  926.         id.forme=ancien_forme;
  927.         TIMER[3]=400;
  928.     end
  929.     If(destruction and id.forme<>3)
  930.         ancien_forme=id.forme;
  931.         id.forme=3;
  932.     end
  933.         if(robots<4 and timer[3]>700 and not(destruction))
  934.         if(rand(0,2)<1)
  935.              robot(110,50,80,150,1);
  936.         else
  937.              id_robot=robot(350,50,310,380,1);
  938.         end
  939.         timer[3]=0;
  940.     end
  941.  
  942.     if(id.forme==1)
  943.         FROM graph = 11 to 14;
  944.             col_jack=collision (TYPE jack);
  945.             IF (col_jack and mort==FALSE)
  946.                 sound(s_mort,256,256);
  947.                 mort=true;
  948.                 REPEAT
  949.                     col_jack.y+=incr_y;
  950.                     incr_y++;
  951.                     col_jack.angle+=pi/16;
  952.                     col_jack.size+=14;
  953.                     FRAME;
  954.                 UNTIL (out_region(col_jack,0));
  955.             signal (col_jack,s_kill);
  956.             vie--;
  957.             bonus_fois=1;
  958.             compte_bonus=0;
  959.             robots=0;
  960.             control();
  961.             END
  962.  
  963.         IF (au_sol)
  964.             IF (direction==-1 ) x+=2; flags=1; IF (x>x2) direction=1; END
  965.                    ELSE x-=2; flags=0; IF (x<x1) direction=-1; END
  966.             END
  967.             IF(TIMER[1]>=300)
  968.             x2+=50;
  969.             END
  970.             if(y>410)
  971.                 sound(s_trans,256,256);
  972.                 from graph=56 to 61;
  973.                     FRAME;
  974.                 end
  975.                 id.forme=2;
  976.                 TIMER[1]=0;
  977.             end
  978.         END
  979.         gravite_robot(15,14);
  980.         FRAME;
  981.         end
  982.       end
  983.         IF(id.forme==2)
  984.             debut=15;
  985.             fin=22;
  986.             for(graph=debut; graph<=fin; graph++)
  987.                 col_jack=collision (TYPE jack);
  988.                 IF (col_jack AND mort==FALSE)
  989.                     sound(s_mort,256,256);
  990.                     mort=true;
  991.                     REPEAT
  992.                         col_jack.y+=incr_y;
  993.                         incr_y++;
  994.                         col_jack.angle+=pi/16;
  995.                         col_jack.size+=14;
  996.                         FRAME;
  997.                     UNTIL (out_region(col_jack,0));
  998.                     signal (col_jack,s_kill);
  999.                     vie--;
  1000.                     bonus_fois=1;
  1001.                     compte_bonus=0;
  1002.                     robots=0;
  1003.                     control();
  1004.                 END
  1005.  
  1006.                 IF (x>id_jack.x)
  1007.                     flags=0;
  1008.                     if(map_get_pixel(0,899+level,x+16,y)==20 or map_get_pixel(0,899+level,x-16,y)==20)
  1009.                             y+=3;
  1010.                     else
  1011.                         if(map_get_pixel(0,899+level,x+16,y)==15 or map_get_pixel(0,899+level,x-16,y)==15)
  1012.                             y-=3;
  1013.                         else
  1014.                             x-=1;
  1015.                         end
  1016.  
  1017.                     end
  1018.  
  1019.                 else
  1020.                     flags=1;
  1021.                     if(map_get_pixel(0,899+level,x+16,y)==20 or map_get_pixel(0,899+level,x-16,y)==20)
  1022.                             y+=3;
  1023.                     else
  1024.                         if(map_get_pixel(0,899+level,x+16,y)==15 or map_get_pixel(0,899+level,x-16,y)==15)
  1025.                             y-=3;
  1026.                         else
  1027.                             x+=1;
  1028.                         end
  1029.  
  1030.                     end
  1031.  
  1032.                 end
  1033.  
  1034.                 IF (y<id_jack.y)
  1035.                     if(map_get_pixel(0,899+level,x,y+16)<>61)
  1036.                         y++;
  1037.                     else
  1038.                         flags=1;
  1039.                         x+=2;
  1040.                     end
  1041.                 else
  1042.                     if(map_get_pixel(0,899+level,x,y-19)<>115)
  1043.                         y--;
  1044.                     else
  1045.                         flags=0;
  1046.                         x-=2;
  1047.                     end
  1048.                 end
  1049.                 frame;
  1050.  
  1051.             END
  1052.           END
  1053.             if(id.forme==3)
  1054.                 if(TIMER[2]>700)
  1055.                     stop_sound(c_alarme);
  1056.                 end
  1057.                 graph=40;
  1058.                 if(TIMER[2]>400)
  1059.                     c_alarme=sound(s_alarme,256,256);
  1060.                  loop
  1061.                     if(reprise)
  1062.                         break;
  1063.                     end
  1064.                     GRAPH++;
  1065.                     if(graph>=48)
  1066.                         graph=40;
  1067.                     end
  1068.                     FRAME;
  1069.                  end
  1070.                 end
  1071.             frame;
  1072.             END
  1073.   END
  1074.  
  1075. END
  1076.  
  1077. PROCESS bonus(x,y)
  1078. BEGIN
  1079.     REPEAT
  1080.         from graph=24 to 31;
  1081.             y+=2;
  1082.             Frame;
  1083.         end
  1084.         graph=24;
  1085.     UNTIL(out_region(id,0));
  1086.     compte_bonus=0;
  1087. END
  1088.  
  1089. PROCESS bonus_vie(x,y)
  1090. BEGIN
  1091.     REPEAT
  1092.         from graph=32 to 39;
  1093.             y+=2;
  1094.             Frame;
  1095.         end
  1096.         graph=32;
  1097.     UNTIL(out_region(id,0));
  1098.     compte_bonus=0;
  1099. END
  1100.  
  1101. PROCESS ballon(x,y)
  1102. PRIVATE
  1103. incr_x=4;
  1104. BEGIN
  1105. graph=49;
  1106.     REPEAT
  1107.         graph++;
  1108.         if(graph>55)
  1109.             graph=49;
  1110.         end
  1111.         if(x<10 or x>460)
  1112.             incr_x=-incr_x;
  1113.         end
  1114.         y++;
  1115.         x=x+incr_x;
  1116.         frame;
  1117.     UNTIL(out_region(id,0));
  1118.     stop_sound(c_ballon);
  1119.     compte_ballon=0;
  1120. END
  1121.  
  1122. PROCESS texte_bonus(x,y)
  1123. PRIVATE
  1124. texte1;
  1125. texte2;
  1126. coord_y;
  1127. BEGIN
  1128.     texte1=write(fonte4,x,y,0,"X ");
  1129.     texte2=write_int(fonte4,x+12,y,0,&bonus_fois);
  1130.     coord_y=y;
  1131.     repeat
  1132.  
  1133.         if(coord_y>30)
  1134.             y-=5;
  1135.         else
  1136.             y+=5;
  1137.         end
  1138.  
  1139.         move_text(texte1,x,y);
  1140.         move_text(texte2,x+10,y);
  1141.         frame;
  1142.  
  1143.     until(y<0)
  1144.  
  1145.     delete_text(texte1);
  1146.     delete_text(texte2);
  1147.  
  1148. END
  1149.  
  1150. PROCESS fin_niveau();
  1151. PRIVATE
  1152. map_fin;
  1153. bonus_point=0;
  1154. BEGIN
  1155.     SWITCH(r_b_a)
  1156.     CASE 24:
  1157.         bonus_point=1000;
  1158.     END
  1159.     CASE 23:
  1160.         bonus_point=700;
  1161.     END
  1162.     CASE 22:
  1163.         bonus_point=500;
  1164.     END
  1165.     CASE 21:
  1166.         bonus_point=300;
  1167.     END
  1168.     END
  1169.  
  1170.     point=point+bonus_point;
  1171.     fade_on();
  1172.     let_me_alone();
  1173.     delete_text(all_text);
  1174.     clear_screen();
  1175.     map_fin=load_map("progs\jack\fin_nive.map");
  1176.     put_screen(0,map_fin);
  1177.     IF(r_b_a>20)
  1178.     REPEAT
  1179.         write(fonte2,90,250,0,"tu as ramasse :");
  1180.         write_int(fonte3,307,245,0,&r_b_a);
  1181.         write(fonte2,360,250,0,"bombes allumees");
  1182.         write(fonte2,90,300,0,"tu gagnes un bonus de :");
  1183.         write_int(fonte3,405,294,0,&bonus_point);
  1184.         write(fonte2,480,302,0,"points");
  1185.         write(0,180,440,0,"APPUIE SUR LA TOUCHE ESPACE POUR CONTINUER...");
  1186.         frame;
  1187.     until(key(_space))
  1188.     ELSE
  1189.     REPEAT
  1190.         write(fonte2,135,250,0,"desole tu n'as ramasse que");
  1191.         write_int(fonte3,300,277,0,&r_b_a);
  1192.         write(fonte2,200,320,0,"bombes allumees");
  1193.         write(fonte2,140,370,0,"Donc tu n'as pas de bonus");
  1194.         write(0,180,440,0,"APPUIE SUR LA TOUCHE ESPACE POUR CONTINUER...");
  1195.         frame;
  1196.     until(key(_space))
  1197.     end
  1198.     fade(0,0,0,2);
  1199.     while(fading);
  1200.         frame;
  1201.     end
  1202.     robots=0;
  1203.     r_b_a=0;
  1204.     bonus_fois=1;
  1205.     destruction=FALSE;
  1206.     reprise=FALSE;
  1207.     control();
  1208. END
  1209.  
  1210. PROCESS gravite(offset_sup, offset_inf);
  1211.  
  1212. PRIVATE
  1213.     c_sol=53;
  1214.     c_toit=33;
  1215.     gravite_temp;
  1216.     c_mur=15;
  1217.  
  1218. BEGIN
  1219.     father.au_sol=FALSE;
  1220.     gravite_temp=(father.vitesse_gravite+=2);
  1221.     IF (gravite_temp>15)
  1222.         father.vitesse_gravite=15;
  1223.         gravite_temp=15;
  1224.     END
  1225.  
  1226.     IF (gravite_temp<0)
  1227.  
  1228.     WHILE (gravite_temp++!=0)
  1229.  
  1230.     IF(key(_alt) or joy.button2 and not father.au_sol)
  1231.         father.vitesse_gravite=0;
  1232.         break;
  1233.     end
  1234.     IF (map_get_pixel(0,899+level,father.x,(father.y-offset_sup))<>c_toit)
  1235.         father.y--;
  1236.     ELSE
  1237.         father.vitesse_gravite=0;
  1238.         BREAK;
  1239.     END
  1240.  
  1241.     END
  1242.  
  1243.     ELSE
  1244.  
  1245.         if(key(_control) and map_get_pixel(0,899+level,father.x,(father.y-offset_sup))<>c_toit)
  1246.           id_jack.y-=5;
  1247.         end
  1248.         father.y+=gravite_temp;
  1249.  
  1250.    FROM gravite_temp=-15 TO 8 ;
  1251.  
  1252.    IF (map_get_pixel(0,899+level,father.x,(father.y+gravite_temp+offset_inf))==c_sol)
  1253.         father.au_sol=TRUE;
  1254.         BREAK;
  1255.    END
  1256.    END
  1257.  
  1258.    IF (gravite_temp<9)
  1259.         father.y+=gravite_temp;
  1260.         father.vitesse_gravite=0;
  1261.    END
  1262.    END
  1263.  
  1264.  
  1265. END
  1266.  
  1267.  
  1268. PROCESS gravite_robot(offset_sup, offset_inf);
  1269.  
  1270. PRIVATE
  1271.     c_sol=53;
  1272.     c_toit=33;
  1273.     gravite_temp;
  1274.  
  1275. BEGIN
  1276.  
  1277.     father.au_sol=FALSE;
  1278.     gravite_temp=(father.vitesse_gravite+=2);
  1279.     IF (gravite_temp>15)
  1280.         father.vitesse_gravite=15;
  1281.         gravite_temp=15;
  1282.     END
  1283.  
  1284.     IF (gravite_temp<0)
  1285.  
  1286.     WHILE (gravite_temp++!=0)
  1287.  
  1288.     IF (map_get_pixel(0,899+level,father.x,(father.y-offset_sup))<>c_toit)
  1289.         father.y--;
  1290.     ELSE
  1291.         father.vitesse_gravite=0;
  1292.         BREAK;
  1293.     END
  1294.  
  1295.     END
  1296.  
  1297.     ELSE
  1298.  
  1299.     father.y+=gravite_temp;
  1300.  
  1301.    FROM gravite_temp=-15 TO 8;
  1302.  
  1303.    IF (map_get_pixel(0,899+level,father.x,(father.y+gravite_temp+offset_inf))==c_sol)
  1304.         father.au_sol=TRUE;
  1305.         BREAK;
  1306.    END
  1307.    END
  1308.  
  1309.    IF (gravite_temp<9)
  1310.         father.y+=gravite_temp;
  1311.         father.vitesse_gravite=0;
  1312.    END
  1313.    END
  1314.  
  1315. END
  1316. PROCESS max(a,b)
  1317. BEGIN
  1318.     IF(a>b)
  1319.         RETURN(a);
  1320.     ELSE
  1321.         RETURN(b);
  1322.     END
  1323. END
  1324. PROCESS instruction()
  1325. PRIVATE
  1326. BEGIN
  1327.  
  1328.   CLEAR_SCREEN();
  1329.   fond=load_map("progs\jack\fin_nive.map");
  1330.   fade_on();
  1331.   put_screen(0,fond);
  1332.   unload_map(fond);
  1333.  
  1334.   write(0,85,232,0,"Bombe éteinte  5 points");
  1335.   write(0,85,272,0,"Bombe allumée 15 points");
  1336.   write(0,85,310,0,"Bonus multiplicateur  5 points");
  1337.   write(0,335,310,0,"Vie supplémentaire 10 points");
  1338.   write(0,355,232,0,"Transforme les robots en soleil");
  1339.   write(0,355,272,0,"Robots vulnérables  50 points");
  1340.  
  1341.   write(0,40,375,6,"Jack se contrôle avec les touches du curseur, pour sauter appuyez sur la touche CTRL et pour");
  1342.   write(0,40,395,6,"couper son élan appuyer sur la touche ALT. Essayez de rammasser le maximum de bombes allumées");
  1343.   write(0,40,415,6,"pour obtenir des points bonus.");
  1344.   write(0,190,440,0,"APPUIE SUR UNE TOUCHE POUR CONTINUER...");
  1345.  
  1346.   while(SCAN_CODE==0);
  1347.  
  1348.         xput(0,8,60,230,0,120,0,0);
  1349.         xput(0,10,60,270,0,120,0,0);
  1350.         xput(0,24,60,310,0,100,0,0);
  1351.         xput(0,32,310,310,0,100,0,0);
  1352.         xput(0,49,310,230,0,100,0,0);
  1353.         xput(0,40,310,270,0,100,0,0);
  1354.  
  1355.         frame;
  1356.   end
  1357.  
  1358.   fade(200,0,0,6);
  1359.   WHILE(fading)
  1360.     frame;
  1361.   end
  1362.   delete_text(all_text);
  1363.   CLEAR_SCREEN();
  1364.   menu();
  1365. END
  1366.  
  1367. PROCESS credit()
  1368. PRIVATE
  1369. image;
  1370. musique;
  1371. BEGIN
  1372. let_me_alone();
  1373. clear_screen();
  1374. load_pal("progs\jack\palette.pal");
  1375. musique=load_song("progs\jack\emelie.xm",1);
  1376. image=load_map("progs\jack\credit.map");
  1377. fade_on();
  1378. put_screen(0,image);
  1379. song(musique);
  1380. while(SCAN_CODE==0);
  1381.      delete_text(all_text);
  1382.      put_screen(0,image);
  1383.      Frame;
  1384. end
  1385.  
  1386.   fade(0,0,0,2);
  1387.   WHILE(fading)
  1388.     frame;
  1389.   end
  1390.   CLEAR_SCREEN();
  1391.   exit("Tchao",0);
  1392. END
  1393.  
  1394.  
  1395.  
  1396.  
  1397.